<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- header -->
    <%@ include file="/WEB-INF/views/include/header.jsp" %>
    <link rel="stylesheet" href="<s:url value="/assets/css/main.css"></s:url>"/>
</head>
<style>
    #laydate_today {
        display: none !important;
    }
    .title{
        width: 100%;
        height: 120px;
        margin: 20px auto;
    }
    .title_div1,.title_div2,.title_div3{
        width: 100%;
        height: 40px;
        text-align: left;
        line-height: 40px;
    }
    .title_div4{
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }
</style>
<body class="no-skin">
<%--上传成功模态框--%>
<div class="shade" style="display: none;"></div>
<div class="warning" style="display: none;">
    <p class="title"><em></em><span class="close">X</span></p>
    <p class="cont"></p>
    <div class="la-square-jelly-box la-3x">
        <div></div>
        <div></div>
    </div>
</div>

<%--修改模态框--%>
<%--
<div class="modal fade" id="modify" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     data-backdrop="static">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">修改</h4></div>
            <div class="modal-body ">
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right">任务名称</label>
                    <div class="col-sm-9">
                        <input type="text" class="Modelname form-control" name="mainName">
                    </div>
                </div>
                &lt;%&ndash;时限 类型&ndash;%&gt;
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right">任务内容</label>
                    <div class="col-sm-9">
                        <textarea type="text" class="form-control" name="content"></textarea>
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right">任务时限</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control date_picker transform" name="timeLimit" readonly>
                    </div>
                </div>
                &lt;%&ndash;附件&ndash;%&gt;
                &lt;%&ndash;<div class="form-group clearfix downloadFile">&ndash;%&gt;
                &lt;%&ndash;<label class="control-label col-sm-2 text-right">附件下载</label>&ndash;%&gt;
                &lt;%&ndash;<div class="col-sm-9">&ndash;%&gt;
                &lt;%&ndash;<input type="text" readonly>&ndash;%&gt;
                &lt;%&ndash;<button class="btn btn-primary" FileSysId="" onclick="download(this)"><span class="glyphicon glyphicon-save"></span>下载附件</button>&ndash;%&gt;
                &lt;%&ndash;</div>&ndash;%&gt;
                &lt;%&ndash;</div>&ndash;%&gt;
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right">任务附件</label>
                    <div class="col-sm-9 pos-rel">
                        &lt;%&ndash;附件回显容器&ndash;%&gt;
                        <div class="downloadContainer"></div>
                        <div id="uploader"></div>
                        &lt;%&ndash;<div>
                            <div style="display: inline-block">
                                <input type="file" class="fileBorder" id="fileupload">
                            </div>
                            <div style="display: inline-block">
                                <button class="btn btn-info" onclick="uploadFile(this,'file','fileName')">
                                    <span class="glyphicon glyphicon-open"></span>上传附件
                                </button>
                            </div>
                        </div>&ndash;%&gt;
                    </div>
                    <input type="hidden" id="temporaryFile" name="file">
                    <input type="hidden" id="temporaryFileName" name="fileName">
                </div>
                <input id="theSysId" type="hidden" name="sysId">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success confirmModify" data-dismiss="modal">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
--%>

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <!-- /section:settings.box -->
                <h3 class="text-center">《${projectDetail.projectName}》填报详情</h3>

                <div class="title container">
                    <div class="title_div1 row">
                        <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1">责任领导：</div>
                        <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11">${projectDetail.leaderName}</div>
                    </div>
                    <div class="title_div2 row">
                        <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1">责任单位：</div>
                        <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11">${zeren}</div>
                    </div>
                    <div class="title_div3 row">
                        <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1">配合单位：</div>
                        <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11">${peihe}</div>
                    </div>
                    <div class="title_div3 row">
                        <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1">备注：</div>
                        <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11">${projectDetail.remarks}</div>
                    </div>
                   <%-- <div class="form-group clearfix title_div4 row">
                        <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1">附件下载：</div>
                        <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11" style="padding-bottom: 30px">
                            <c:if test="${not empty taskMain.files}">
                                <c:forEach items="${taskMain.files}" var="fileMap">
                                    <div style="margin-bottom:15px;">
                                        <input style="width: 50%;" type="text" class="fileName" readonly
                                               title="${fileMap.fileName}"
                                               value="${fileMap.fileName}" onclick="copyFile(this)">
                                        <button class="btn btn-primary file" onclick="download(this)"
                                                FileSysId="${fileMap.file}">
                                            下载附件
                                        </button>
                                    </div>
                                </c:forEach>
                            </c:if>
                            <c:if test="${empty taskMain.mainResultFile}">
                                <input style="width: 50%;" type="text" value="无附件" class=" col-sm-3 form-control" readonly>
                            </c:if>
                        </div>
                </div>--%>

                    <%--<div class="title_div2 row" style="margin-bottom: 120px;">
                        <div class="text1 col-xs-6	col-sm-4	col-md-3	col-lg-2"  onclick="lookMore()"> <a id="look_more" href="javascript:;">查看子事项</a> </div>
                        <div class="text2 col-xs-6	col-sm-8	col-md-9	col-lg-10"></div>
                    </div>--%>
                    <%--<div class="title_div3 row">
                        <c:if test="${not empty taskUnit}">
                            <c:forEach items="${taskUnit}" var="listUnit">
                                <div class="text1 col-xs-5	col-sm-3	col-md-2	col-lg-1 the_title_look_more" >子事项：</div>
                                <div class="text2 col-xs-7	col-sm-9	col-md-10	col-lg-11 the_look_more"  >${listUnit.taskSubName}---->${listUnit.unitType=='1'?'牵头单位':'协办单位'}：${listUnit.deptName}</div>
                            </c:forEach>
                        </c:if>

                    </div>--%>


                </div>

                <div id="projectId" style="display: none" >
                  ${projectId}
                </div>




                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <!-- jqGrid表格 -->
                        <table id="gridTable"></table>
                        <!-- jqGrid工具类 -->
                        <div id="gridPager"></div>
                        <!-- 查询对话框 -->
                        <div style="display: none;">
                            <div class="row" id="queryDialog"></div>
                        </div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->

<%--                <h4 class="redTips">温馨提示：双击表格行或者点击"查看详情" 查看任务列表</h4>--%>
            </div>
        </div><!-- /.main-content -->

        <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
            <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
        </a>

        <%@ include file="/WEB-INF/views/include/dialog.jsp" %>
    </div><!-- /.main-container -->
</div>




<!-- footer -->
<%--多选上传--%>
<script src="<s:url value="/assets/js/dist/easyUploader.jq.js"></s:url>"></script>
<%@ include file="/WEB-INF/views/include/footer.jsp" %>
<script src="<s:url value="/assets/js/own.js"></s:url>"></script>

<script type="text/javascript">
    // 基本路径
    var baseUrl = "<s:url value="/sys/gongjian/projectTasks/own"></s:url>"

    // jqgrid的表格高度
    var height = 320;
    // jqgrid表格行头的中文
    var colNames = ['', '操作','审核状态','任务名称','任务期限',"填报时间",'反馈账号','形象进度', '预计月底能否达成本月节点', "备注（未达标备注）", "本期完成交地面积", "完成交地总面积", "本期完成拆迁面积",'完成拆迁总面积','本期完成征迁户数','完成征迁总户数'];//我派发的任务\

    //我的任务表
    var colModel = [
        {name: 'sysId', index:'sysId',width: 60, hidden: true, key: true},
        {name: 'sy', width: 60, align: "center", formatter: feedbackBtnFormatter},

        {name: 'auditInfo', index: 'auditInfo', width: 120, editable: true},
        {name: 'taskName', index: 'taskName', width: 350, editable: true},
        {name: 'taskEndDate', index: 'taskEndDate', width: 100, editable: true},
        {name: 'createDate', index: 'createDate', width: 140, editable: true},

        {name: 'createName', index: 'createName', width: 100, editable: true},
        {name: 'xingxiang', index: 'xingxiang', width: 250, editable: true},
        {name: 'reachoals', index: 'reachoals', width: 163, editable: true,formatter:reahchFormatter},
        {name: 'remarks', index: 'remarks', width: 150, editable:                       true},
        {name: 'currentMianji', index: 'currentMianji', width: 120, editable:           true},
        {name: 'finishMianji', index: 'finishMianji', width: 120, editable:             true},
        {name: 'currentChaiqian', index: 'currentChaiqian', width: 120, editable:       true},
        {name: 'finishChaiqian', index: 'finishChaiqian', width: 120, editable:         true},
        {name: 'currentZhengqianhu', index: 'currentZhengqianhu', width: 120, editable: true},
        {name: 'finishZhengqianhu', index: 'finishZhengqianhu', width: 120, editable:   true},


    ];



    function feedbackBtnFormatter(value, grid, rowes, state) {
        grid.colModel.title = false
        return "<div style='color: #049CE6;display: flex;justify-content: center'>" +
            // "<div style='width: 80px;cursor: pointer' title='查看'id='showDetailView'>查看详情</div>" +
            // "<div class='establish' style='width: 40px;border-left:1px solid #049CE6;cursor: pointer; display: " + (rows.status == 9 ? "block" : "none") + "' title='立项'>立项</div>" +
            "<div style='width: 80px;cursor: pointer' title='反馈'class='lookdetail'> <a onclick=showEditView('"+rowes.sysId+"')>反馈 </a></div>" +
            // "<div class='summary' style='width: 100px;border-left:1px solid #049CE6;cursor: pointer;' title='反馈汇总'>反馈汇总 </div>" +
            // "<div class='handle' style='width: 100px;border-left:1px solid #049CE6;cursor: pointer;' title='督查流程记录'>督查流程记录 </div>" +
            // "<div class='handle' style='width: 100px;border-left:1px solid #049CE6;cursor: pointer;' title='督查流程记录'>督查流程记录 </div>" +
            // "<div style='border-left:1px solid #049CE6;width: 40px;cursor: pointer'title='修改' class='modify' >单位反馈记录</div>" +
            // "<div class='deteleTask' style='width: 40px;border-left:1px solid #049CE6;cursor: pointer;display:" + (!rows.crucialUser ? "block" : "none") + "' title='删除'>删除</div>" +
            "</div>";
    }



    var rowIds;
    // jqgrid的具体执行方法
    jqgrid({
        gridTableId: "#gridTable",
        gridPagerId: "#gridPager",
        postData: {'projectId': $('#projectId').html().trim(),'projectType':1},
        autoScroll: false,
        shrinkToFit: false,
        multiselect: false,
        rownumbers: true,
        grouping:true,
        sortname:'taskName',
        groupingView : {
            groupField : ['taskName'],
            groupColumnShow : [false],
            groupText:['任务名：'+'<b>{0}</b>']
        },
        onSelectRow: function (rowid, status) {
            rowIds = rowid;
            //选择当前的行

        },
        loadComplete: function (data) {

        },
        onSelectAll: function (aRowids, status) {

        },
        gridComplete: function () {
        },
        ondblClickRow: function (rowid) {


        }
    });



    //重置表单
    function reset() {
        resetForm("#formDialog form");
    }



    function reahchFormatter(value) {

        switch (value) {
            case 0:
                return "未填写"
            case 1:
                return "是"
            case 2:
                return "否"

        }
    }


    function showEditView(sysId) {

        loadDialog({
            dialogTitle: '反馈对话框',
            dialogUrl: "/sys/gongjian/edit/"+sysId,
            dialogFoot: '<button type="button" class="btn btn-primary" onclick="create()">添加</button>' +
                '<button type="button" class="btn btn-pink" onclick="reset()">重置</button>' +
                '<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>'
        });
    }

    function create() {
        executeSaveOrUpdate({
            formId: "#formDialog form",
            dialogId: "#formDialog",
            url: "/sys/gongjian/feedback",
            tableId: "#gridTable",
            successMessage: "反馈成功",
            successTitle: '反馈对话框',
            // failMessage: '保存失败',
            failTitle: '任务反馈结果:'
        });
    }




</script>



</body>
</html>